Repository navigation
fix: keep dropdowns in plugin pages open while their frame grows - #1962
Open
ZacharyZcR wants to merge 1 commit into
Open
ZacharyZcR wants to merge 1 commit into
ZacharyZcR wants to merge 1 commit into
Conversation
|
AI review | Looks safe to merge Adds a resize event shim to keep Radix Select menus open when plugin frames grow vertically to fit them. The implementation correctly filters height-only resizes, includes matching tests, and follows all repository standards with no security or stability risks. Reviewed 676d3f9. AI can be wrong, a maintainer still decides. Comment |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1947 and Termix-SSH/Plugin-AI#31
A frame sized to its content grows while a menu is open, so the menu has room (
withOpenMenusin frame-root). Growing resizes the frame's window, and Radix Select closes on any windowresize, which the other Radix menus don't do. So every Select in a plugin page closed again the moment it opened, and the frame shrank back, which made the page jump. This hits plugin settings, host defaults and the AI plugin's provider and model pickers.Change
A frame shim,
installMenuResizeShimininstall-shims.ts, installed next to the form submit shim. It adds the frame's firstresizelistener. When only the height changed and a Radix popper is open, the resize is the frame making room for the menu, so the shim stops it withstopImmediatePropagationbefore the menu's own listener sees it. A real resize changes the width too and still closes the menu. With no menu open, every resize passes.CHANGELOG: a line under 26.11.4 Fixed.
Testing
src/ui/tests/plugin-frame/menu-resize.test.ts, with a resize listener standing in for Radix Select's:tsc -p tsconfig.app.jsonare clean. The form submit and frame menu tests still pass.